import {request} from './ljxdata.js'
const serverurl = 'http://localhost:8080' 
export function getcart(data) {
    return request({
        url: serverurl+'/system/cart/list?pageNum=1&pageSize=42',
        method: 'get',
        params: data,
      })
}
export function commitcart(data) {
    return request({
        url: serverurl+"/system/cart",
        method: 'put',
        data: data,
        headers: { 'Content-Type': 'application/json;charset=UTF-8' }
      })
}
export function addcart(data) {
  return request({
      url: serverurl+"/system/cart",
      method: 'post',
      data: data,
      headers: { 'Content-Type': 'application/json;charset=UTF-8' }
    })
}
export function removecartbyids(ids) {
  return request({
      url: serverurl+"/system/cart/"+ids,
      method: 'delete',
      headers: { 'Content-Type': 'application/json;charset=UTF-8' }
    })
}